<form action="" method="post">
    <input type="text" name="text">
    <input type="submit" name="sub" value="转换">
</form>
<?php
/**
 * User: lie
 * Date: 2020/12/4 11:23
 * Title: 获取任意字符的 ASCII码
 * Description:
 * Error:
 */
if ($_POST['sub']) {
    echo ord($_POST['text']);
}